package org.example.DesignPatterns.Iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 19:18
 **/
public class Client {

    public static void main(String[] args) {
        DrivingRecorder drivingRecorder=new DrivingRecorder();
        for(int i=0;i<12;i++){
            drivingRecorder.append("视频_"+i);
        }
//        drivingRecorder.display();
//        drivingRecorder.displayByOrder();

        List<String> uStorage=new ArrayList<>();
        Iterator<String> iterator=drivingRecorder.iterator();

        while (iterator.hasNext()){
            String video=iterator.next();
            System.out.println(video);
            if("视频_10".equals(video)){
                uStorage.add(video);
            }
        }
    }
}